package com.bosch.in.rtp1.ept.model.technical;

import com.bosch.in.rtp1.ept.constant.QueryKeyWord;
import com.bosch.in.rtp1.ept.util.HoldCodeUtility;
import com.bosch.in.rtp1.ept.util.StringUtility;

public class Condition4LotStatus extends SearchCriteria {
	
	private String department;
	private String customerName;
	private  String productArea;
	private String priority;
	private String holdCode;
	private String holdCodeText;
	private String holdReason;
	/* This is special field, which is calculated by another fields.*/
	private String waittime = "";
	/* This is special number field, which is rounded up.*/
	private String x_plan = "";
	/* This is special number field, which is rounded up.*/
	private String x_rwh = "";	
	/* This is special number field, which is rounded up.*/
	private String x_rw = "";	
	
	public String getDepartment() {
		return department;
	}
	public void setDepartment(String department) {
		this.department = department;
	}
	public String getCustomerName() {
		return customerName;
	}
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
	public String getProductArea() {
		return productArea;
	}
	public void setProductArea(String productArea) {
		this.productArea = productArea;
	}
	public String getPriority() {
		return priority;
	}
	public void setPriority(String priority) {
		this.priority = priority;
	}
	public String getHoldCode() {
		return holdCode;
	}
	public void setHoldCode(String holdCode) {
		this.holdCode = holdCode;
	}
	public String getHoldReason() {
		return holdReason;
	}
	public void setHoldReason(String holdReason) {
		this.holdReason = holdReason;
	}
	public String getHoldCodeText() {
		return holdCodeText;
	}
	public void setHoldCodeText(String holdCodeText) {
		this.holdCodeText = holdCodeText;
	}
	
	public String getHoldText_Codes() {
		String txtCodes = holdCodeText;
		if (holdCodeText == null || holdCodeText.equals("")) {
			txtCodes = StringUtility.convertToSelectAllIfNull(holdCode);
		} else if(!holdCodeText.equals(HoldCodeUtility.MULTI) 
				&& !holdCodeText.equals(HoldCodeUtility.REST)
				&& holdCode != null && !holdCode.equals("")) {
			txtCodes += QueryKeyWord.BLANK + QueryKeyWord.OPEN + holdCode + QueryKeyWord.CLOSE;
		}
		
		return txtCodes;
	}
	public String getWaittime() {
		return waittime;
	}
	public void setWaittime(String waittime) {
		this.waittime = waittime;
	}
	public String getX_plan() {
		return x_plan;
	}
	public void setX_plan(String x_plan) {
		this.x_plan = x_plan;
	}
	public String getX_rwh() {
		return x_rwh;
	}
	public void setX_rwh(String x_rwh) {
		this.x_rwh = x_rwh;
	}
	public String getX_rw() {
		return x_rw;
	}
	public void setX_rw(String x_rw) {
		this.x_rw = x_rw;
	}
	
}
